package com.weng.platform.stories.model.vo;

import com.weng.framework.common.model.component.tree.TreeNode;
import com.weng.framework.common.model.component.tree.TreeNodeConverter;
import com.weng.platform.stories.entity.Stories;

import java.util.Date;

/**
 * 课时树表
 * @author wengzhonghui
 */
public class StoriesTreeNode extends TreeNode implements TreeNodeConverter<Stories, StoriesTreeNode> {

	private String id;
    private String name;
    private int position;
    private String sourcesName;
    private String remark;
    /**
   	 * 1、有效标识，正常，其他不正常
   	 */
    private Date updateTime;
    private String chapterType;
    private Integer progressWeb;
    private Integer progressApi;
    private String iterationId;
    private Integer progressIntegrate;
    private String priority;

    public String getSourcesName() {
        return sourcesName;
    }

    public void setSourcesName(String sourcesName) {
        this.sourcesName = sourcesName;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

   


	public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


    public String getChapterType() {
        return chapterType;
    }

    public void setChapterType(String chapterType) {
        this.chapterType = chapterType;
    }


    public Integer getProgressWeb() {
        return progressWeb;
    }

    public void setProgressWeb(Integer progressWeb) {
        this.progressWeb = progressWeb;
    }

    public Integer getProgressApi() {
        return progressApi;
    }

    public void setProgressApi(Integer progressApi) {
        this.progressApi = progressApi;
    }

    public String getIterationId() {
        return iterationId;
    }

    public void setIterationId(String iterationId) {
        this.iterationId = iterationId;
    }

    public Integer getProgressIntegrate() {
        return progressIntegrate;
    }

    public void setProgressIntegrate(Integer progressIntegrate) {
        this.progressIntegrate = progressIntegrate;
    }

    public String getPriority() {
        return priority;
    }

    public void setPriority(String priority) {
        this.priority = priority;
    }

    @Override
    public StoriesTreeNode convert(Stories t) {
        StoriesTreeNode node = new StoriesTreeNode();
        // tree node
        node.setKey(t.getId());
        node.setLabel(t.getName());
        node.setParentId(t.getParentId());

        // property
        node.setId(t.getId());
        node.setName(t.getName());
        node.setPosition(t.getPosition());
        node.setUpdateTime(t.getUpdateTime());
        node.setChapterType(t.getChapterType());

        node.setProgressWeb(t.getProgressWeb());
        node.setProgressApi(t.getProgressApi());
        node.setIterationId(t.getIterationId());
        node.setProgressIntegrate(t.getProgressIntegrate());
        node.setPriority(t.getPriority());
        return node;
    }
}
